home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 4 / developer source - volume 4.iso / unixr / mar95 / rice11.gif < prev    next >
Graphics Interchange Format  |  1995-09-26  |  182KB  |  649x596  |  8-bit (106 colors)
Labels: text | menu | document | font | screenshot
OCR: A Script To Monitor Disk Usage FIGURE 1 #!/bin/sh set S(LINE) # # Define two variables: # We are only interested in the / FILESYS is the file system we are # file system interested in. # THRESHOLD is the minimum acceptable if [ "$1" = $(FILESYS} ] free MB. then # FILESYS="/" # The 5th field is the free space THRESHOLD=1000 # in MB. # If it is less than 100; alert # # the user. # Run /etc/dfspace to determine available # disk space if [ $5 -Lt ${THRESHOLD) ] then /etc/dfspace | while read LINE /bin/echo "File system ST.\ do is low on space. $5 MB remaining ." # Skip the blank Line exit.0 # fi if [ "$(LINE)" = ""] then # continue; # If we get here, there is no fi # problem. exit 0 # Parse the detail Line done